package com.project.bean;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

/**
 * 销售信息实体类
 */
@TableName("t_saleInfo")
public class SaleInfoBean {
    //编号
    @TableId(value = "pk_saleInfoId",type = IdType.AUTO )
    private Integer id;
    //销售的商品
    @TableField(exist = false)
    private GoodsBean goodsBean;
    //商品编号
    @TableField("fk_goodsId")
    private Integer goodsId;
    //成交价
    @TableField("s_sellMoney")
    private Integer sellMoney;
    //销售数量
    @TableField("s_num")
    private Integer num;
    // 销售实体类
    @TableField(exist = false)
    private SaleBean saleBean;
    // 销售id
    @TableField("fk_saleId")
    private Integer saleId;

    public SaleInfoBean() {
    }

    public SaleInfoBean(Integer goodsId, Integer sellMoney, Integer num, Integer saleId) {
        this.goodsId = goodsId;
        this.sellMoney = sellMoney;
        this.num = num;
        this.saleId = saleId;
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public GoodsBean getGoodsBean() {
        return goodsBean;
    }

    public void setGoodsBean(GoodsBean goodsBean) {
        this.goodsBean = goodsBean;
    }

    public Integer getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(Integer goodsId) {
        this.goodsId = goodsId;
    }

    public Integer getSellMoney() {
        return sellMoney;
    }

    public void setSellMoney(Integer sellMoney) {
        this.sellMoney = sellMoney;
    }

    public Integer getNum() {
        return num;
    }

    public void setNum(Integer num) {
        this.num = num;
    }

    public SaleBean getSaleBean() {
        return saleBean;
    }

    public void setSaleBean(SaleBean saleBean) {
        this.saleBean = saleBean;
    }

    public Integer getSaleId() {
        return saleId;
    }

    public void setSaleId(Integer saleId) {
        this.saleId = saleId;
    }

    @Override
    public String toString() {
        return "SaleInfoBean{" +
                "id=" + id +
                ", goodsBean=" + goodsBean +
                ", goodsId=" + goodsId +
                ", sellMoney=" + sellMoney +
                ", num=" + num +
                ", saleBean=" + saleBean +
                ", saleId=" + saleId +
                "}\n";
    }
}
